﻿using System;
using DTO;
using DAO;
using System.Data;

namespace BUS
{
    public class BUSQuanLyDiem
    {
        public static DataTable LietKeKhoiLop()
        {
            try
            {
                DataTable dtb = DAOQuanLyDiem.LietKeLookupEditData("sp_LietKeKhoiLop");
                return dtb;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static DataTable LietKeHocKy()
        {
            try
            {
                DataTable dtb = DAOQuanLyDiem.LietKeLookupEditData("sp_LietKeHocKy");
                return dtb;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static DataTable LietKeLop(object makhoilop)
        {
            try
            {
                return DAOQuanLyDiem.LietKeLop(makhoilop);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static DataTable LietKeMonHoc(object makhoilop)
        {

            try
            {
                return DAOQuanLyDiem.LietKeMonHoc(makhoilop);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static DataTable BangDiemHocSinh(object malop,DTODiem diem)
        {
            try
            {
                return DAOQuanLyDiem.BangDiemHocSinh(malop, diem);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static int CapNhatDiemHocSinh(DTODiem diem)
        {
            try
            {
                int ketqua = 0;
                ketqua = DAOQuanLyDiem.CapNhatDiemHocSinh(diem);
                return ketqua;
            }
            catch (Exception ex)
            {
                throw ex;
            }

        }
    }
}
